#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a, b;
	int c = 0;
	int i = 0;
	int x = 0;
	int y = 0;
	scanf("%d %d", &a, &b);
	x = a % 10;
	y = b % 10;
	c += x + y * 10;
	a /= 10;
	b /= 10;
	x = a;
	y = b;
	c += x * 100 + y*1000;
	printf("%d", c);
	return 0;
}